3.8.100 \(\int \frac {(-a-b x)^{-n} (a+b x)^n}{x^2} \, dx\)

Optimal. Leaf size=24 \[ -\frac {(-a-b x)^{-n} (a+b x)^n}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {23, 30} \begin {gather*} -\frac {(-a-b x)^{-n} (a+b x)^n}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^n/(x^2*(-a - b*x)^n),x]

[Out]

-((a + b*x)^n/(x*(-a - b*x)^n))

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int \frac {(-a-b x)^{-n} (a+b x)^n}{x^2} \, dx &=\left ((-a-b x)^{-n} (a+b x)^n\right ) \int \frac {1}{x^2} \, dx\\ &=-\frac {(-a-b x)^{-n} (a+b x)^n}{x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 24, normalized size = 1.00 \begin {gather*} -\frac {(-a-b x)^{-n} (a+b x)^n}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^n/(x^2*(-a - b*x)^n),x]

[Out]

-((a + b*x)^n/(x*(-a - b*x)^n))

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.05, size = 24, normalized size = 1.00 \begin {gather*} -\frac {(-a-b x)^{-n} (a+b x)^n}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(a + b*x)^n/(x^2*(-a - b*x)^n),x]

[Out]

-((a + b*x)^n/(x*(-a - b*x)^n))

________________________________________________________________________________________

fricas [A]  time = 1.00, size = 9, normalized size = 0.38 \begin {gather*} -\frac {\cos \left (\pi n\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/x^2/((-b*x-a)^n),x, algorithm="fricas")

[Out]

-cos(pi*n)/x

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (b x + a\right )}^{n}}{{\left (-b x - a\right )}^{n} x^{2}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/x^2/((-b*x-a)^n),x, algorithm="giac")

[Out]

integrate((b*x + a)^n/((-b*x - a)^n*x^2), x)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 25, normalized size = 1.04 \begin {gather*} -\frac {\left (-b x -a \right )^{-n} \left (b x +a \right )^{n}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^n/x^2/((-b*x-a)^n),x)

[Out]

-(b*x+a)^n/x/((-b*x-a)^n)

________________________________________________________________________________________

maxima [A]  time = 0.94, size = 8, normalized size = 0.33 \begin {gather*} -\frac {\left (-1\right )^{n}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/x^2/((-b*x-a)^n),x, algorithm="maxima")

[Out]

-(-1)^n/x

________________________________________________________________________________________

mupad [B]  time = 1.04, size = 24, normalized size = 1.00 \begin {gather*} -\frac {{\left (a+b\,x\right )}^n}{x\,{\left (-a-b\,x\right )}^n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)^n/(x^2*(- a - b*x)^n),x)

[Out]

-(a + b*x)^n/(x*(- a - b*x)^n)

________________________________________________________________________________________

sympy [A]  time = 4.70, size = 17, normalized size = 0.71 \begin {gather*} - \frac {\left (- a - b x\right )^{- n} \left (a + b x\right )^{n}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**n/x**2/((-b*x-a)**n),x)

[Out]

-(-a - b*x)**(-n)*(a + b*x)**n/x

________________________________________________________________________________________